/**
 * Created by liubin on 2017/6/3.
 */


var DtjSz = cc.Sprite.extend({

    mSzNum : null,

    ctor : function() {
        this._super();

        this.mSzNum = parseInt(Math.random() * 5 + 1);

        this.setSpriteFrame("sz" + this.mSzNum + ".png");

        this.setScale(mo.dtjCardHelper.cardScale);
    },


    yaoSz : function (num) {
        var repeatTime = 0;
        var totalRepeatTime = 20;
        this.schedule(function () {
            repeatTime++;
            if(repeatTime == totalRepeatTime){
                this.mSzNum = num;
                this.runAction(cc.sequence(
                    cc.delayTime(2.0),
                    cc.hide()
                ));
            }else{
                this.mSzNum = parseInt(Math.random() * 5 + 1);
            }
            this.setSpriteFrame("sz" + this.mSzNum + ".png");
        }, 0.1, totalRepeatTime - 1);
    },

});